package cn.momoshenchi.service;

import cn.momoshenchi.pojo.Tips;
import com.baomidou.mybatisplus.extension.service.IService;

import java.io.IOException;
import java.util.List;

/**
 *
 */
public interface TipsService extends IService<Tips> {


    Tips getRandomOne();

    /**
     * 添加小知识并且添加到es
     * @param tips
     */
    void insertWithEs(Tips tips) throws IOException;

    /**
     * 批量小知识并且添加到es
     * @param tipsList
     */
    void insertListWithEs(List<Tips> tipsList) throws IOException;
}
